all files / pagination/ pageItem.vue

50% Statements 6/12
66.67% Branches 4/6
20% Functions 1/5
25% Lines 2/8
1 branch Ignored     
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59                  1×                                                                                                  
//
//
//
//
//
//
//
//
 
import abstractButton from '../internal/abstractButton'
export default{
  props: {
    icon: {
      type: String
    },
    index: {
      type: Number
    },
    isCircle: {
      type: Boolean,
      default: false
    },
    disabled: {
      type: Boolean,
      default: false
    },
    isActive: {
      type: Boolean,
      default: false
    },
    identifier: {
      type: String
    }
  },
  data () {
    return {
    }
  },
  methods: {
    handleHover (event) {
      this.$emit('hover', event)
    },
    handleHoverExit (event) {
      this.$emit('hoverExit', event)
    },
    handleClick () {
      if (this.index) {
        this.$emit('click', this.index)
      } else {
        this.$emit('click', this.identifier)
      }
    }
  },
  components: {
    'abstract-button': abstractButton
  }
}